// 查询列表 mixin
export const InitListPage = {
  data() {
    return {
      tableHeight: 0,
      size: this.$size
    };
  },
  beforeRouteEnter(to, from, next) {
    next(vm => {
      if (from.meta.refresh) {
        from.meta.refresh = false;
        vm.handleSearch(true);
      }
    });
  },
  methods: {
    resize(val) {
      this.tableHeight = val;
    }
  }
};

export const AddPageMixin = {
  methods: {
    triggerRefresh() {
      this.$route.meta.refresh = true;
    }
  }
};
